home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / Sample Editors⁄Viewers / Panel Editor / Source / FramePE.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-08  |  3.1 KB  |  114 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        FramePE.h
  3.  
  4.     Contains:    Frame Class Definition
  5.  
  6.     Written by:    Steve Smith
  7.     
  8.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  9. */
  10.  
  11. #ifndef _FRAMEPE_
  12. #define _FRAMEPE_
  13.  
  14. // -- PanelEditor Includes --
  15.  
  16. #ifndef _SAMPLECOLLECTIONS_
  17. #include "SampleCollections.h"
  18. #endif
  19.  
  20. // -- OpenDoc Includes --
  21.  
  22. #ifndef _ODTYPES_
  23. #include <ODTypes.h>
  24. #endif
  25.  
  26.  
  27. class CListItem;
  28. class ODPart;
  29. class ODFrame;
  30. class ODFacet;
  31.  
  32. //=============================================================================
  33. // CFrame
  34. //=============================================================================
  35. class CFrame
  36. {
  37.     public:
  38.     
  39.     // --- Init ---
  40.     CFrame();
  41.     virtual ~CFrame();
  42.     virtual void    InitFrame();
  43.     
  44.     // --- Layout ---
  45.     virtual void    RemoveAll(Environment* ev);
  46.     virtual void    AddFrame(Environment* ev, ODFrame* containingFrame);
  47.     virtual void    RemoveFrame(Environment* ev, ODFrame* containingFrame);
  48.     virtual void    CloseFrame(Environment* ev, ODFrame* containingFrame);
  49.     virtual void    Resize(Environment* ev, ODFrame* containingFrame);
  50.     virtual void    AttachSourceFrame(Environment* ev, ODFrame* frame, ODFrame* src);
  51.     
  52.     // --- Imaging ---
  53.     virtual void    AddFacet(Environment* ev, ODFacet* containgingFacet);
  54.     virtual void    AddFacet(Environment* ev, ODFacet* containgingFacet,
  55.                                 ODFrame* frame);
  56.     virtual void    RemoveFacet(Environment* ev, ODFacet* containgingFacet);
  57.     virtual void    RemoveFacet(Environment* ev, ODFacet* containgingFacet,
  58.                                 ODFacet* facet);
  59.     virtual void    AddFacets(Environment* ev, ODFrame* containingFrame);
  60.     virtual void    RemoveFacets(Environment* ev, ODFrame* containingFrame);
  61.     
  62.     protected:
  63.     
  64.     // --- Getters ---
  65.     virtual ODRect        GetFrameBounds(Environment* ev, ODFrame* containingFrame) = 0;
  66.     virtual Point        GetFrameOffset() = 0;
  67.     virtual ODTypeToken    GetPresentation() = 0;
  68.     virtual ODBoolean    MakeSubframe() = 0;
  69.     virtual ODObjectType    GetFrameType() = 0;
  70.     
  71.     // --- Layout ---
  72.     virtual void    CreateFrames(Environment* ev);
  73.     virtual void    CreateFacets(Environment* ev);
  74.     virtual void    NewFrame(Environment* ev, ODFrame* containingFrame);
  75.     virtual void    PrepareFrame(Environment* ev, ODFrame* frame);
  76.     virtual void    CleanupFrame(Environment* ev, ODFrame* frame, ODBoolean frameRemoved);
  77.         
  78.     // --- Imaging ---
  79.     virtual void    PrepareFacet(Environment* ev, ODFacet* facet);
  80.     virtual void    CleanupFacet(Environment* ev, ODFacet* facet);
  81.     virtual void    FacetChanged(Environment* ev, ODFacet* facet);
  82.  
  83.     // --- Members ---
  84.     
  85.     ODBoolean        fInited;
  86.     CFrameList*        fContainingFrames;
  87.     CFrameList*        fFrames;
  88.     ODPart*            fPartDisplayed;
  89.     
  90. };
  91.  
  92.  
  93. //--------------------------------------------------------------------------
  94. // Inlines
  95. //--------------------------------------------------------------------------
  96.  
  97. inline void CFrame::CleanupFrame(Environment* ev, ODFrame* frame, ODBoolean frameRemoved)
  98. { /* no implementation */; }
  99.  
  100. inline void CFrame::PrepareFrame(Environment* ev, ODFrame* frame)
  101. { /* no implementation */; }
  102.  
  103. inline void CFrame::PrepareFacet(Environment* ev, ODFacet* facet)
  104. { /* no implementation */; }
  105.  
  106. inline void CFrame::CleanupFacet(Environment* ev, ODFacet* facet)
  107. { /* no implementation */; }
  108.  
  109. inline void CFrame::FacetChanged(Environment* ev, ODFacet* facet)
  110. { /* no implementation */; }
  111.  
  112.  
  113.  
  114. #endif